Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
nuke-icon
Advanced tools
Icon 组件 是对 Image 组件的一个封装,预置了4个尺寸的图片,方便我们在开发中使用方形的图片。
考虑到使用便捷性,还额外加入了 Iconfont 图标的支持,内置的 icon 库是:iconfont.cn 上的千牛官方库,所有支持的 icon 以及对应的 name 值,可以扫码看 demo 。
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
size | 当传入name时失效,定义了icon的尺寸:'xs', 'small', 'medium', 'large' | string | 'medium' |
onPress | 当传入name时失效,Press事件 | Function | 无 |
src | 当传入name时失效图片链接地址,注意图片必须为方图 | string | 无 |
name | iconfont name值 | string | 无 |
version | 如果使用新版千牛官方图标,则需传入v2 | string | default |
扫码预览(手淘、千牛、天猫等)
// 切换到你的 rax 项目中
tnpm i nuke-icon --save
// 参考如下 demo 您可能还需要安装
// tnpm i nuke-view nuke-text nuke-layout nuke-page --save
/** @jsx createElement */
import {createElement, Component,render } from 'rax';
import View from 'nuke-view';
import Text from 'nuke-text';
import Icon from 'nuke-icon';
import { MultiRow } from 'nuke-layout';
import Page from 'nuke-page';
const ICONS = {
v2:["accessory","activity","activity_fill","add","addition_fill","addition","addpeople_fill","addpeople","addressbook_fill","addressbook","barrage_fill","barrage","browse_fill","browse","brush","brush_fill","businesscard_fill","businesscard","camera_fill","camera","clock_fill","clock","close","collection_fill","collection","computer_fill","computer","coordinates_fill","coordinates","coupons_fill","coupons","createtask_fill","createtask","customerservice_fill","customerservice","delete_fill","delete","document","document_fill","dynamic_fill","dynamic","editor","eit","emoji_fill","emoji","empty","empty_fill","enter","enterinto","enterinto_fill","feedback_fill","feedback","flag_fill","flag","flashlight","flashlight_fill","flip","flip_fill","fullscreen","group","group_fill","headlines_fill","headlines","homepage_fill","homepage","integral_fill","integral","interactive_fill","interactive","keyboard","label","label_fill","like_fill","like","live_fill","live","lock_fill","lock","mail","mail_fill","manage_fill","manage","message","message_fill","mine","mine_fill","mobilephone_fill","mobilephone","more","narrow","offline_fill","offline","order_fill","order","other","people_fill","people","picture_fill","picture","play","play_fill","playon_fill","playon","praise_fill","praise","prompt_fill","prompt","qrcode_fill","qrcode","redpacket_fill","redpacket","refresh","remind_fill","remind","return","right","scan","select_fill","select","send","service_fill","service","setup_fill","setup","share_fill","share","shielding_fill","shielding","smallscreen_fill","smallscreen","stealth_fill","stealth","success_fill","success","suspend","switch","systemprompt_fill","systemprompt","tailor","task","task_fill","tasklist_fill","tasklist","text","time_fill","time","translation_fill","translation","trash","trash_fill","undo","unlock_fill","unlock","video","video_fill","warning_fill","warning","workbench_fill","workbench","search","searchfill","qianniu","publishgoods_fill","shop_fill","transaction_fill","packup","unfold","wangwang","financial_fill","marketing_fill","shake","decoration_fill","decoration_fill","decoration_fill"]
}
let App = class NukeDemoIndex extends Component {
constructor() {
super();
}
renderGridCellV2 = (item,index) => {
return <View style={styles.iconCell}>
<Icon version="v2" style={[styles.icon,styles.new]} name={item} />
<Text style={styles.iconShowCode}>{item}</Text>
</View>
}
render() {
return (
<Page title="Icon">
<Page.Intro main="全新的 icons 集合(v2)"></Page.Intro>
<View style={styles.lineWithMargin}><MultiRow dataSource={ICONS['v2']} rows={3} renderRow={this.renderGridCellV2} /></View>
</Page>
);
}
}
const styles={
icon:{
fontSize:40,
marginBottom:20,
marginRight:'10rem'
},
iconCell:{
justifyContent:'center',
height:'180rem',
alignItems:'center',
borderWidth:'1rem',
borderColor:'#eeeeee',
borderStyle:'solid',
},
new:{
fontSize:68,
color:'#3089dc'
},
listLine:{
marginLeft:'40rem',
marginRight:'40rem',
padding:'20rem',
flexDirection:'row',
backgroundColor:'#ffffff'
},
lineWithMargin:{
marginLeft:'40rem',
marginRight:'40rem',
backgroundColor:'#ffffff'
},
iconShowCode:{
fontSize: 24,
color:'#999999',
}
}
render(<App/>);
FAQs
The npm package nuke-icon receives a total of 30 weekly downloads. As such, nuke-icon popularity was classified as not popular.
We found that nuke-icon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.